package com.sunday.authorization.security.authorization.redis.mixin;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.oauth2.core.OAuth2AccessToken;

import java.time.Instant;
import java.util.Collections;
import java.util.Set;


@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        isGetterVisibility = JsonAutoDetect.Visibility.NONE)
public abstract class OAuth2AuthorizationConsentMixin {

    @JsonCreator
    OAuth2AuthorizationConsentMixin(@JsonProperty("registeredClientId") String registeredClientId,
                                    @JsonProperty("principalName") String principalName,
                                    @JsonProperty("authorities") Set<GrantedAuthority> authorities) {
    }
}
